﻿<div>
    <div class="btn-group">
        <button class="btn btn-default waves-effect" ng-click="list.add()">
            <span class="glyphicon glyphicon-plus"></span>
        </button>
        <button class="btn btn-info waves-effect" ng-click="list.load()">
            <span class="glyphicon glyphicon-refresh"></span>
        </button>
    </div>
    <table ng-table="list.tableParams" class="table table-bordered table-hover table-condensed" ng-form="list.tableForm" disable-filter="list.isAdding" tracked-table="list.tableTracker">
        <tr ng-repeat="row in $data" ng-form="rowForm" tracked-table-row="row">
            <td title="'变量名'" sortable="'Key'">
                {{row.Key}}
            </td>
            <td title="'变量值'">
                <div style="max-height: 200px;overflow-y: auto" ng-bind-html="row.Value|htmlString"></div>
            </td>
            <td title="'操作'">
                <div class="btn-group">
                    <button class="btn btn-success btn-sm waves-effect" ng-click="list.edit(row)">修改</button>
                </div>
            </td>
        </tr>
    </table>
</div>

<div id="modal" class="modal">
    <div class="container-fluid" style="margin: 15px 0;">
        <form class="bgm-white">
            <div class="input-group">
                <span class="input-group-addon">
                    变量名：
                </span>
                <div class="fg-line">
                    <input type="text" class="form-control" ng-model="values.Key"  ng-disabled="values.Id>0"/>
                </div>
            </div>
            <div class="input-group">
                <span class="input-group-addon">
                    变量值：
                </span>
                <div style="height: 300px;" class="ueditor" ng-model="values.Value" type="text/plain"></div>
            </div>
            <div class="btn-group">
                <button type="button" class="btn btn-info waves-effect" ng-click="submit(values)">确认</button>
                <button type="button" class="btn btn-danger waves-effect" ng-click="closeAll()">取消</button>
            </div>
        </form>
    </div>
</div>